﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace ESOL.Controls
{
    public partial class DevButton : DevExpress.XtraEditors.SimpleButton
    {
        public DevButton()
        {
            InitializeComponent();
        }

        public DevButton(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
        }

        public new bool Enabled
        {
            get
            {
                if (this.Tag != null && this.Tag.ToString() == "Disable")
                {
                    return false;
                }
                return base.Enabled;
            }
            set
            {
                if (this.Tag != null && this.Tag.ToString() == "Disable")
                {
                    base.Enabled = false;
                }
                else
                {
                    base.Enabled = value;
                }
            }
        }
    }
}
